<!-- include tpl=head_lay -->
<div class="layui-card">
	<div class="layui-card-header">
		{lang风格} <span class="red">{$rs.title} {$folder}</span>
		<div class="layui-btn-group fr">
			<button type="button" class="layui-btn layui-btn-sm" onclick="$.admin_tpl.add_folder('{$id}','{$folder}')">
				{lang创建文件夹}
			</button>
			<button type="button" class="layui-btn layui-btn-sm" onclick="$.admin_tpl.add_file('{$id}','{$folder}','{$rs.ext}')">
				{lang创建模板文件}
			</button>
			<!-- if $folder != "/" -->
			<button type="button" class="layui-btn layui-btn-sm" onclick="$.phpok.go('{echo admin_url(\'tpl\',\'list\')}&id={$id}')">
				{lang点此返回根目录}
			</button>
			<!-- /if -->
		</div>
	</div>
	<div class="layui-card-body">
		<blockquote class="layui-elem-quote">
			<!-- php:$tmp = 'tpl/'.$rs.folder.''.$folder -->
			{lang要实现在线编辑和上传功能，请确保 [folder] 下的文件有写入权限|folder:$tmp}
		</blockquote>
		<table class="layui-table">
		<thead>
		<tr>
			<th width="40">&nbsp;</th>
			<th>{lang名称}</th>
			<th width="150px">{lang时间}</th>
			<th>&nbsp;</th>
		</tr>
		</thead>
		<tbody>
		<!-- loop from=$dirlist key=$key value=$value -->
		<tr>
			<td align="center"><img src="images/filetype/dir.gif" border="0" alt="{lang文件夹}"></td>
			<td colspan="2">{$value.title}</td>
			<td>
				<div class="layui-btn-group">
					<input type="button" value="{lang改名}" onclick="$.admin_tpl.folder_rename('{$id}','{$folder}','{$value.title}')" class="layui-btn layui-btn-sm" />
					<input type="button" value="{lang进入}" onclick="$.phpok.go('{$value.url}')" class="layui-btn layui-btn-sm" />
					<input type="button" value="{lang删除}" class="layui-btn layui-btn-sm layui-btn-danger" onclick="$.admin_tpl.del('{$id}','{$folder}','{$value.title}')" />
				</div>
			</td>
		</tr>
		<!-- /loop -->
		<!-- loop from=$rslist key=$key value=$value -->
		<tr>
			<td align="center"><img src="images/filetype/{$value.type}.gif" border="0" alt="文件：{$value.title}"></td>
			<td>{$value.title}</td>
			<td>{$value.date}</td>
			<td>
				<div class="layui-btn-group">
					<input type="button" value="{lang改名}" onclick="$.admin_tpl.file_rename('{$id}','{$folder}','{$value.title}')" class="layui-btn layui-btn-sm" />
					<!-- if in_array($value.type,$edit_array) -->
					<input type="button" value="{lang编辑}" onclick="$.admin_tpl.edit('{$id}','{$folder}','{$value.title}')" class="layui-btn layui-btn-sm" />
					<!-- elseif in_array($value.type,$pic_array) -->
					<input type="button" value="{lang查看}" onclick="$.admin_tpl.view('tpl/{$rs.folder}{$folder}{$value.title}')" class="layui-btn layui-btn-sm" />
					<!-- else -->
					<input type="button" value="{lang下载}" onclick="$.admin_tpl.download('{$id}','{$folder}','{$value.title}')" class="layui-btn layui-btn-sm" />
					<!-- /if -->
					<input type="button" value="{lang删除}" onclick="$.admin_tpl.del('{$id}','{$folder}','{$value.title}')" class="layui-btn layui-btn-sm layui-btn-danger" />
				</div>
			</td>
		</tr>
		<!-- /loop -->
		</tbody>
		</table>
	</div>
</div>
<!-- include tpl=foot_lay -->